package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.Map;

public class Violation {
    private String id;

    private String fdCode;

    private String fdType;

    private String fdReason;

    private String fdStatus;

    private String fdDate;

    private String fdViolatorId;

    private String fdMoney;

    private String fdCreaterId;

    private String fdApproverId;

    private String fdApproveTime;

    private String status;

    private Date createTime;

    private Date updateTime;

    //违章人 开单人 审批人
    private String createrName;
    private String violatorName;
    private String approvedName;

    //运行中心大屏
    private String dataonly;

    public String getDataonly() {
        return dataonly;
    }

    public void setDataonly(String dataonly) {
        this.dataonly = dataonly;
    }

    public String getTimeonly() {
        return timeonly;
    }

    public void setTimeonly(String timeonly) {
        this.timeonly = timeonly;
    }

    private String timeonly;


    public static final transient Map<String,String> FDTYPE = ImmutableMap.of("0","安全纪律","1","质量内控","2","客户投诉","3","仓储规范");
    public static final transient Map<String,String> FDSTATUS = ImmutableMap.of("0","待审批","1","已通过","2","已驳回","3","已作废");



    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getFdCode() {
        return fdCode;
    }

    public void setFdCode(String fdCode) {
        this.fdCode = fdCode == null ? null : fdCode.trim();
    }

    public String getFdType() {
        return fdType;
    }

    public String getFdTypeCn() {
        return FDTYPE.get(getFdType());
    }

    public void setFdType(String fdType) {
        this.fdType = fdType == null ? null : fdType.trim();
    }

    public String getFdReason() {
        return fdReason;
    }

    public void setFdReason(String fdReason) {
        this.fdReason = fdReason == null ? null : fdReason.trim();
    }

    public String getFdStatus() {
        return fdStatus;
    }

    public String getFdStatusCn() {
        return FDSTATUS.get(getFdStatus());
    }

    public void setFdStatus(String fdStatus) {
        this.fdStatus = fdStatus == null ? null : fdStatus.trim();
    }

    public String getFdDate() {
        return fdDate;
    }

    public void setFdDate(String fdDate) {
        this.fdDate = fdDate == null ? null : fdDate.trim();
    }

    public String getFdViolatorId() {
        return fdViolatorId;
    }

    public void setFdViolatorId(String fdViolatorId) {
        this.fdViolatorId = fdViolatorId == null ? null : fdViolatorId.trim();
    }

    public String getFdMoney() {
        return fdMoney;
    }

    public void setFdMoney(String fdMoney) {
        this.fdMoney = fdMoney == null ? null : fdMoney.trim();
    }

    public String getFdCreaterId() {
        return fdCreaterId;
    }

    public void setFdCreaterId(String fdCreaterId) {
        this.fdCreaterId = fdCreaterId == null ? null : fdCreaterId.trim();
    }

    public String getFdApproverId() {
        return fdApproverId;
    }

    public void setFdApproverId(String fdApproverId) {
        this.fdApproverId = fdApproverId == null ? null : fdApproverId.trim();
    }

    public String getFdApproveTime() {
        return fdApproveTime;
    }

    public void setFdApproveTime(String fdApproveTime) {
        this.fdApproveTime = fdApproveTime == null ? null : fdApproveTime.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public String getCreateTimeFt() {
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreaterName() {
        return createrName;
    }

    public void setCreaterName(String createrName) {
        this.createrName = createrName;
    }

    public String getViolatorName() {
        return violatorName;
    }

    public void setViolatorName(String violatorName) {
        this.violatorName = violatorName;
    }

    public String getApprovedName() {
        return approvedName;
    }

    public void setApprovedName(String approvedName) {
        this.approvedName = approvedName;
    }
}